<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    .box1{
        width: 200px;
        height: 200px;
        border: 1px solid #000;
        background: gold;
        margin: 10px auto;
    }
    .box1>div{
        width: 120px;
        height: 50px;
        margin: 75px auto;
        background: green;
    }

    .box2{
        width: 120px;
        height: 50px;
        background: gold;
        padding: 75px 40px;
        margin: 10px auto;
    }
    .box2>div{
        width: 120px;
        height: 50px;
        background: green;
    }
</style>
<body>
    <div class="box1">
        <div></div>
    </div>

    <div class="box2">
        <div></div>
    </div>
</body>
</html>